{% extends "base.html" %}

{% load url from future %}

{% block extrastyle %}

<script type="text/javascript" src="/resources/vendor/jquery/1.7.1/jquery-1.7.1.min.js"></script>
<link rel="stylesheet" href="/resources/vendor/bootstrap/css/bootstrap.min.css">
<script type="text/javascript" src="/resources/vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/resources/vendor/linkify/1.0/jquery.linkify-1.0-min.js"></script>
<link rel="stylesheet" href="/resources/vendor/jquery-ui-1.8.18.custom/jquery-ui-1.8.18.custom.css">
<script type="text/javascript" src="/resources/vendor/jquery-ui-1.8.18.custom/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="/resources/jquery.facetview.js"></script>
<link rel="stylesheet" href="/resources/css/facetview.css">
<script type="text/javascript" src="/resources/vendor/d3/d3.min.js"></script>
<script type="text/javascript" src="/resources/vendor/d3/d3.geom.min.js?2.1.3"></script>
<script type="text/javascript" src="/resources/vendor/d3/d3.layout.min.js?2.1.3"></script>

<script type="text/javascript">
    jQuery(document).ready(function($) {
        $('.facet-view-simple').facetview({
            //search_url: location.protocol + '//' + location.hostname + ':9200/_search?',
            search_url: location.protocol + '//' + location.host + '/_search/?',
            search_index: 'elasticsearch',
            result_display: [
                [
                    {
                        "pre": "<strong>",
                        "field": "title",
                        "post": "</strong>"
                    },
                ],
                [
                    {
                        "field": "url",
                    },
                ],
            ],
            facets: [
            {
                'field': 'site',
                'display': 'site',
            },
            {
                'field': 'boost',
                'size': 20,
                'order': 'reverse_term',
                'display': 'boost',
            },
            ],
        });
    });
</script>

{% endblock %}

{% block app-content %}

<div class="facet-view-simple">
</div>

{% endblock %}
